from Input import Input
from CircularShift import CircularShift
from AlphabeticShifts import AlphabeticShifts
from Output import Output


class Kwic():
    def __init__(self, file_name, get_input_data=[], get_circular_data=[], get_sort_data=[]):
        self.file_name = file_name
        self.get_input_data = get_input_data
        self.get_circular_data = get_circular_data
        self.get_sort_data = get_sort_data

    def run(self):
        input_file = Input(self.file_name)
        self.get_input_data = input_file.run()

        circular_shift = CircularShift(self.get_input_data)
        self.get_circular_data = circular_shift.run()

        alphabetic_shift = AlphabeticShifts(self.get_circular_data)
        self.get_sort_data = alphabetic_shift.run()

        output = Output(self.get_sort_data)
        output.run()


if __name__ == '__main__':
    kwic = Kwic("text.txt")
    kwic.run()
